Skip to main content
Version: v1.1.0

API Reference

allxon_infrasturcture

Terminologies

  • Allxon Cloud: The backend server(s) of Allxon service, both Allxon Portal and Allxon Agents are connected to Allxon Cloud.
  • Allxon Portal: The frontend server(s) of Allxon service.
  • Allxon Agent: The agent application of Allxon service.
  • Plugin: A software application developed by developers to extend the functionalities of Allxon service. Plugin sends collected data from modules to Allxon Cloud via Allxon Agents. Also plugin sends commands to modules from Allxon Portal via Allxon Agents.
  • Module: A hardware component or a software application developed by its vendors. Plugin collects data or send commands to a module via the methods provided by its vendor.
  • MQTT Broker: Each Allxon Agent will connect to a MQTT broker hosted by Allxon Cloud. All the data exchange between Allxon Agents and Allxon Cloud will go through this channel.
  • WebSocket Server: Each plugin will connect to a WebSocket server hosted within the Allxon Agent. Plugin sends and receives data to/from Allxon Cloud with Plugin APIs through this channel.
  • Octo API: The Application Programming Interface used to communicate between Allxon Agent and Plugin.
  • Allxon Octo SDK: The Software Development Kit provided by Allxon to help developers to build up and verify Plugin APIs.
  • App GUID: A unique identifier assigned by Allxon to each plugin in UUIDv4 format.
  • Access Key: A secret key assigned by Allxon to each plugin for message signing.

Octo API

Octo API adopts JSON-RPC 2.0 Specification over WebSocket. Connect Allxon Agent WebSocket server with URL "wss://localhost:55688".

caution

Each API maximum payload size is 128 KB.

danger

Not support JSON-RPC batch.

How to Read

  • It's a JSON-RPC Notification Request if API name start with notify....
  • The bracket along with JSON Key repesent following JSON Type:
    • Object, Array, String, Number, Bool, Null
  • If there is no bracket along with JSON Key, Means JSON Type is String.

v2/notifyPluginUpdate

{
"jsonrpc": "2.0",
"method": "v2/notifyPluginUpdate",
"params": {
"appGUID": "...",
"epoch": "...",
"appName": "...",
"displayName": "...",
"type": "...",
"sdk": "...",
"version": "...",
"startCommand": "...",
"stopCommand": "...",
"modules": [
{
"moduleName": "...",
"displayName": "...",
"description": "...",
"properties": [ ... ],
"states": [ ... ],
"metrics": [ ... ],
"events": [ ... ],
"commands": [ ... ],
"alarms": [ ... ],
"configs": [ ... ]
}
]
}
}

$.params

NameTypeRequiredDescription
appGUIDStringcheckxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
appNameStringcheckxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
epochStringcheckxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
displayNameStringxxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
sdkStringcheckxxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
versionStringcheckxxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
startCommandStringxxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
stopCommandStringxxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
modulesArraycheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*]

NameTypeRequiredDescription
moduleNameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
propertiesArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
statesArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
metricsArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
eventsArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
commandsArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
alarmsArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
configArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].properties[*]

{
"name": "...",
"displayName": "...",
"displayCategory": "...",
"description": "...",
"displayType": "...",
"value": "..."
}
NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayCategoryStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayTypeStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
valueStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].states[*]

{
"name": "...",
"displayName": "...",
"displayCategory": "...",
"description": "...",
"displayType": "..."
}
NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayCategoryStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayTypeStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].metrics[*]

{
"name": "...",
"displayName": "...",
"displayCategory": "...",
"description": "...",
"displayUnit": "...",
"displayType": "..."
}
NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayCategoryStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayUnitStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayTypeStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].events[*]

{
"name": "...",
"displayName": "...",
"displayCategory": "...",
"description": "..."
}
NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayCategoryStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].commands[*]

{
"name": "...",
"displayCategory": "...",
"displayName": "...",
"description": "...",
"type": "...",
"params": [
{
"name": "...",
"displayName": "...",
"description": "...",
"displayType": "...",
"required": "...",
"requiredOn": "...",
"defaultValue": "...",
"displayMask": "...",
"valueEncoding": "..."
}, ...
]
}
NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayCategoryStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
typeStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
paramsArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].commands[*].params[*]

NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayTypeStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
requiredBoolcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
requiredOnStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayValueStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayFormatStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
valueFromPropertyStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayMaskBoolxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
valueEncodingStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayOnPropertyStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].alarms[*]

{
"name": "...",
"displayCategory": "...",
"displayName": "...",
"description": "...",
"params": [
{
"name": "...",
"displayName": "...",
"description": "...",
"displayType": "...",
"required": "...",
"displayValues": "...",
"defaultValue": "...",
"displayFormat": "...",
"valueFromProperty": "...",
"displayMask": "...",
"valueEncoding": "..."
}, ...
]
}
NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayCategoryStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
paramsArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].alarms[*].params[*]

NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayTypeStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
requiredBoolcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayValueStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
defaultValueStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayFormatStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
valueFromPropertyStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayMaskBoolxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
valueEncodingStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].config[*]

{
"name": "...",
"displayCategory": "...",
"displayName": "...",
"description": "...",
"params": [
{
"name": "...",
"displayName": "...",
"description": "...",
"displayType": "...",
"required": "...",
"displayValues": "...",
"defaultValue": "...",
"displayFormat": "...",
"valueFromProperty": "...",
"displayMask": "...",
"valueEncoding": "..."
}, ...
]
}
NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayCategoryStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
paramsArrayxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.modules[*].config[*].params[*]

NameTypeRequiredDescription
nameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayNameStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
descriptionStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayTypeStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
requiredBoolcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayValueStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
defaultValueStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayFormatStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
valueFromPropertyStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
displayMaskBoolxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
valueEncodingStringxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

v2/notifyPluginCommand

{
"jsonrpc": "2.0",
"method": "v2/notifyPluginCommand",
"params": {
"serialNumber": "...",
"appGUID": "...",
"epoch": "...",
"commandId": "...",
"commandSource": "...",
"moduleName": "...",
"commands": [ ... ]
}
}

$.params

NameTypeRequiredDescription
serialNumberStringxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
appGUIDStringcheckxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
epochStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
commandIdStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
commandSourceStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
moduleNameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
commandsArraycheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.commands[*]

NameTypeRequiredDescription
nameStringcheckxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
paramsArrayxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx

$.params.commands[*].params[*]

NameTypeRequiredDescription
nameStringcheckxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
valueObject | Stringxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx

v2/notifyPluginCommandAck

{
"jsonrpc": "2.0",
"method": "v2/notifyPluginCommandAck",
"params": {
"serialNumber": "...",
"appGUID": "...",
"epoch": "...",
"commandId": "...",
"commandSource": "...",
"moduleName": "...",
"commandState": "...",
"commandAcks": [
{
"name": "...",
"result": { ... }
}, ...
]
}
}

$.params

NameTypeRequiredDescription
serialNumberStringxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
appGUIDStringcheckxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
epochStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
commandIdStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
commandSourceStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
moduleNameStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
commandStateStringcheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
commandAcksArraycheckxxxx xxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

$.params.commandAcks[*]

NameTypeRequiredDescription
nameStringcheckxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
resultObjectxxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx

v2/notifyPluginState

Example
{
"jsonrpc": "2.0",
"method": "v2/notifyPluginUpdate",
"params": {}
}